<template>
  <div>
    <el-button @click="goToContract()">新增</el-button>
    <el-button>修改</el-button>
    <el-button>删除</el-button>
    <div>
      <el-form :data="args" :inline="true">

      </el-form>
      <el-table :data="contracts" style="width:100%">
        <el-table-column label="合同编号" prop="id"></el-table-column>
        <el-table-column label="合同名称" prop="contractName"></el-table-column>
        <el-table-column label="合同金额" prop="contractAmount"></el-table-column>
        <el-table-column label="供应商" prop="providerId"></el-table-column>
        <el-table-column label="签约日期" prop="createDate"></el-table-column>
        <el-table-column label="录入人" prop="contractSignatory"></el-table-column>
        <el-table-column label="流程状态" prop="approveStatus"></el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import MaterialContractModel from "../../model/lyz/MaterialContractModel"
const MCM=MaterialContractModel.getInstance();
export default {
  data(){
    return{
      args:{},//搜索参数
      contracts:[],//数据
    }
  },
  created(){
    this.getContracts();
  },
  methods:{
    getContracts(){
      MCM.getContractList(this.args).then((response)=>{this.contracts=response.data.data})
    },
    goToContract(){
      this.$router.push("/MaterialContract");
    }
  }
}
</script>